package com.hfzy.ihk.common.facade.enums.call;

import com.hfzy.ihk.common.facade.CustomEnumType;

import java.util.HashMap;
import java.util.Map;

/**
 * @author wws
 */
public enum CommitTo implements CustomEnumType {

    DONG_JIN("0","东进"),
    FJ_TELECOM("1","电信"),
    APP_ON_LINE("2","手机在线"),
    APP_OFF_LINE("3","手机离线"),
    COP_LINE("4","联通"),
    ALIYUN_LINE("5","阿里云sip"),
    ALIYUN("9","阿里云"),
    INT_ALIYUN("10","智能外呼"),
    BL_ALIYUN("11","保利双呼"),
    ASR_ALIYUN("12","机器人外呼"),
    FREESWITCH("8","freeswitch外呼"),
    ASR_FREESWITCH("13","freeswitch单呼"),
    BL_FREESWITCH("17","保利freeswitch外呼");

    private CommitTo(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    private String value;

    private String desc;
    @Override
    public String getValue() {
        return value;
    }

    @Override
    public String getDesc() {
        return desc;
    }
    private static Map<String, CommitTo> map = new HashMap<>();
    static {
        for (CommitTo value : CommitTo.values()) {
            map.put(value.getValue(), value);
        }
    }

    public static CommitTo fromValue(String value) {
        CommitTo ret = map.get(value);
        if (ret != null) {
            return ret;
        } else {
            throw new IllegalArgumentException("No enum const " + CommitTo.class + "." + value);
        }
    }

}
